﻿import request from '/@/utils/request';
enum Api {
	AddTwoCategories = '/api/twoCategories/add',
	DeleteTwoCategories = '/api/twoCategories/delete',
	UpdateTwoCategories = '/api/twoCategories/update',
	PageTwoCategories = '/api/twoCategories/page',
	DetailTwoCategories = '/api/twoCategories/detail',
	GetOneCategoriesOIdDropdown = '/api/twoCategories/OneCategoriesOIdDropdown',
	AddOne = '/api/twoCategories/AddOne'
}

// 增加二级工单
export const addTwoCategories = (params?: any) =>
	request({
		url: Api.AddTwoCategories,
		method: 'post',
		data: params,
	});

// 删除二级工单
export const deleteTwoCategories = (params?: any) =>
	request({
		url: Api.DeleteTwoCategories,
		method: 'post',
		data: params,
	});

// 编辑二级工单
export const updateTwoCategories = (params?: any) =>
	request({
		url: Api.UpdateTwoCategories,
		method: 'post',
		data: params,
	});

// 分页查询二级工单
export const pageTwoCategories = (params?: any) =>
	request({
		url: Api.PageTwoCategories,
		method: 'post',
		data: params,
	});

// 详情二级工单
export const detailTwoCategories = (id: any) =>
	request({
		url: Api.DetailTwoCategories,
		method: 'get',
		data: { id },
	});

export const getOneCategoriesOIdDropdown = () =>
	request({
		url: Api.GetOneCategoriesOIdDropdown,
		method: 'get'
	});
export const addOne = (params?: any) =>
	request({
		url: Api.AddOne,
		method: 'post',
		data: params,
	})
